<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/** 
<span class='line'>  2</span> * @fileOverview 공통 > Canvas를 이용한 선 그리기
<span class='line'>  3</span> * @author dioong 
<span class='line'>  4</span> */</span><span class="WHIT">
<span class='line'>  5</span> </span><span class="NAME">nhn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">window.nhn</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  6</span> </span><span class="NAME">nhn.newsstand</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  7</span> </span><span class="NAME">nhn.newsstand.common</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.common</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  8</span> </span><span class="COMM">/**
<span class='line'>  9</span>  * @static
<span class='line'> 10</span>  * @class  공통 > Canvas를 이용한 선 그리기
<span class='line'> 11</span>  */</span><span class="WHIT">
<span class='line'> 12</span> </span><span class="NAME">nhn.newsstand.common.CanvasPathPainter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 13</span> </span><span class="WHIT">	</span><span class="NAME">_htPathList</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 14</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 15</span> 	 * path 초기화 함수
<span class='line'> 16</span> 	 * @param {Object} 옵션 값.
<span class='line'> 17</span> 	 */</span><span class="WHIT">
<span class='line'> 18</span> </span><span class="WHIT">	</span><span class="NAME">init</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oOptions</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 19</span> </span><span class="WHIT">		</span><span class="NAME">this._sBubbler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">oOptions.bubbllerClass</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 20</span> </span><span class="WHIT">		</span><span class="NAME">this._elMarker</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$$.getSingle</span><span class="PUNC">(</span><span class="STRN">"canvas._marker"</span><span class="PUNC">,</span><span class="NAME">oOptions.elContainer</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 21</span> </span><span class="WHIT">		</span><span class="NAME">this._ctx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._elMarker.getContext</span><span class="PUNC">(</span><span class="STRN">"2d"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 22</span> </span><span class="WHIT">		</span><span class="NAME">this._elMarker.style.display</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"block"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 23</span> </span><span class="WHIT">		</span><span class="NAME">this._elPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$$.getSingle</span><span class="PUNC">(</span><span class="STRN">"canvas._onArticleLine"</span><span class="PUNC">,</span><span class="NAME">oOptions.elContainer</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="WHIT">		</span><span class="NAME">this._elPath.style.display</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"block"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 26</span> </span><span class="WHIT">		</span><span class="NAME">this._strokeOption</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 27</span> </span><span class="WHIT">			</span><span class="STRN">'style'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'round'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 28</span> </span><span class="WHIT">			</span><span class="STRN">'LINEWEIGHT'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">oOptions</span><span class="PUNC">[</span><span class="STRN">"border"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="STRN">"LINEWEIGHT"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 29</span> </span><span class="WHIT">			</span><span class="STRN">'COLOR'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">oOptions</span><span class="PUNC">[</span><span class="STRN">"border"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="STRN">"COLOR"</span><span class="PUNC">]</span><span class="WHIT">
<span class='line'> 30</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 31</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="WHIT">		</span><span class="NAME">this._htPathList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 33</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 34</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 35</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 36</span> 	 * 그려진 Path를 모두 제거하는 interface
<span class='line'> 37</span> 	 */</span><span class="WHIT">
<span class='line'> 38</span> </span><span class="WHIT">	</span><span class="NAME">clearPath</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 39</span> </span><span class="WHIT">		</span><span class="NAME">this._ctx.clearRect</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">this.nWidth</span><span class="PUNC">,</span><span class="NAME">this.nHeight</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 40</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 41</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 42</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 43</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 44</span> 	 * 서버에서 던져주는 좌표 데이터를 사용하기 쉽게 hash형태로 초기화 시키는 함수.
<span class='line'> 45</span> 	 * @param {Array} aPathData 좌표 데이터.
<span class='line'> 46</span> 	 * @param {String} sSide 좌/우측 면  ("left"|"right")
<span class='line'> 47</span> 	 */</span><span class="WHIT">
<span class='line'> 48</span> </span><span class="WHIT">	</span><span class="NAME">setPathData</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aPathData</span><span class="PUNC">,</span><span class="NAME">sSide</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 49</span> </span><span class="WHIT">		</span><span class="NAME">this._htPathList</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPathData</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 50</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 51</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 52</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 53</span> 	 * path좌표를 배율 계산해서 반환하는 함수 
<span class='line'> 54</span> 	 * @param {Array} aPoint Path좌표 배열
<span class='line'> 55</span> 	 * @param {Boolean} bRightPage 우측 페이지 여부
<span class='line'> 56</span> 	 * @param {Number} nDPI  배율
<span class='line'> 57</span> 	 */</span><span class="WHIT">
<span class='line'> 58</span> </span><span class="WHIT">	</span><span class="NAME">multiplicate</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aPoint</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bRightPage</span><span class="PUNC">,</span><span class="NAME">nDPI</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 59</span> </span><span class="WHIT">         </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nCorrectWidth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">bRightPage</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">this.nWidth</span><span class="PUNC">/</span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 60</span> </span><span class="WHIT">         </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aTemp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="WHIT">         </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aAdjusted</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 62</span> </span><span class="WHIT">         </span><span class="NAME">$A</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aPoint</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">forEach</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">v</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">o</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 63</span> </span><span class="WHIT">    	 	</span><span class="NAME">aTemp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">v.split</span><span class="PUNC">(</span><span class="STRN">","</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 64</span> </span><span class="WHIT">    	 	</span><span class="WHIT">
<span class='line'> 65</span> </span><span class="WHIT">    	 	</span><span class="NAME">aAdjusted.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.common.util.roundXL</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">aTemp</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">*</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">nDPI</span><span class="PUNC">/</span><span class="NUMB">300</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">+</span><span class="NAME">nCorrectWidth</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.common.util.roundXL</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">aTemp</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">*</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">nDPI</span><span class="PUNC">/</span><span class="NUMB">300</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'> 66</span> </span><span class="WHIT">         </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 67</span> </span><span class="WHIT">         </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">aAdjusted</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 68</span> </span><span class="WHIT">     </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 69</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 71</span> 	 * Path를 그릴 영역을 너비와 높이 값을 지정한다.
<span class='line'> 72</span> 	 * @param {Number} nWidth 너비 값
<span class='line'> 73</span> 	 * @param {Number} nHeight 높이 값
<span class='line'> 74</span> 	 */</span><span class="WHIT">
<span class='line'> 75</span> </span><span class="WHIT">	</span><span class="NAME">setPaperSize</span><span class="WHIT">  </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nWidth</span><span class="PUNC">,</span><span class="NAME">nHeight</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 76</span> </span><span class="WHIT">		</span><span class="NAME">this.nWidth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nWidth</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 77</span> </span><span class="WHIT">		</span><span class="NAME">this.nHeight</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nHeight</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 79</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 80</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 81</span>  	 * Path를 노출하는 interface
<span class='line'> 82</span>  	 * @param {Hashtable} htLOC Path가 그려질 좌표 값
<span class='line'> 83</span> 	 * @param {Number} nDPI  배율
<span class='line'> 84</span>  	 */</span><span class="WHIT">
<span class='line'> 85</span> </span><span class="WHIT">	</span><span class="NAME">ShowPath</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">htLOC</span><span class="WHIT"> </span><span class="PUNC">,</span><span class="NAME">nDPI</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 86</span> </span><span class="WHIT">        </span><span class="NAME">this._drawPath</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">htLOC</span><span class="PUNC">,</span><span class="NAME">nDPI</span><span class="PUNC">,</span><span class="STRN">"SELECT"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 87</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 88</span> </span><span class="WHIT">    </span><span class="WHIT">
<span class='line'> 89</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 90</span>  	 * Path를 그리는 함수
<span class='line'> 91</span>  	 * @param {Hashtable} htLOC Path가 그려질 좌표 값
<span class='line'> 92</span> 	 * @param {Number} nDPI  배율
<span class='line'> 93</span> 	 * @param {String} sType 노출 타입 ("OVER"|"SELECT")
<span class='line'> 94</span>  	 */</span><span class="WHIT">
<span class='line'> 95</span> </span><span class="WHIT">    </span><span class="NAME">_drawPath</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">htLOC</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nDPI</span><span class="PUNC">,</span><span class="NAME">sType</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 96</span> </span><span class="WHIT">    	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">htLOC.IDX</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 97</span> </span><span class="WHIT">    	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sSide</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">htLOC.side</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 98</span> </span><span class="WHIT">    	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">bRightPage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sSide</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"left"</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 99</span> </span><span class="WHIT">    	</span><span class="WHIT">
<span class='line'>100</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aPoint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.multiplicate</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.getPointList</span><span class="PUNC">(</span><span class="NAME">sSide</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bRightPage</span><span class="WHIT"> </span><span class="PUNC">,</span><span class="NAME">nDPI</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">        </span><span class="WHIT">
<span class='line'>101</span> </span><span class="WHIT">	    </span><span class="NAME">this._ctx.strokeStyle</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._strokeOption</span><span class="PUNC">[</span><span class="STRN">"COLOR"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">sType</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>102</span> </span><span class="WHIT">	    </span><span class="NAME">this._ctx.lineWidth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._strokeOption</span><span class="PUNC">[</span><span class="STRN">"LINEWEIGHT"</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>103</span> </span><span class="WHIT">	    </span><span class="WHIT">
<span class='line'>104</span> </span><span class="WHIT">	    </span><span class="NAME">this._ctx.beginPath</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>105</span> </span><span class="WHIT">	    </span><span class="NAME">this._ctx.moveTo</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aPoint</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aPoint</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aPoint.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">			</span><span class="NAME">this._ctx.lineTo</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aPoint</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aPoint</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">y</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT">		</span><span class="NAME">this._ctx.closePath</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>110</span> </span><span class="WHIT">		</span><span class="NAME">this._ctx.stroke</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">    </span><span class="WHIT">
<span class='line'>113</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>114</span>  	 * 넘어온 좌표 값을 바탕으로 해당 좌표 값에 있는 기사에 대한 정보를 가져온다.
<span class='line'>115</span>  	 * @param {Hashtable} htPoint 대상 좌표 값
<span class='line'>116</span> 	 * @param {Number} nDPI  배율
<span class='line'>117</span>  	 * @return {Hashtable} 기사 ID값과 index값, 해당 기사의 좌/우측 존재여부
<span class='line'>118</span>  	 */</span><span class="WHIT">
<span class='line'>119</span> </span><span class="WHIT">	</span><span class="NAME">getMouseLocation</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">htPoint</span><span class="WHIT"> </span><span class="PUNC">,</span><span class="NAME">nDPI</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>120</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>121</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">bRightPage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>122</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htLoc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.searchCurrentPath</span><span class="PUNC">(</span><span class="NAME">this._htPathList</span><span class="PUNC">[</span><span class="STRN">"left"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="NAME">htPoint</span><span class="PUNC">,</span><span class="NAME">nDPI</span><span class="PUNC">,</span><span class="NAME">bRightPage</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>123</span> </span><span class="WHIT">        </span><span class="WHIT">
<span class='line'>124</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">htLoc.IDX</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">        	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>126</span> </span><span class="WHIT">        		</span><span class="STRN">"IDX"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">htLoc.IDX</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>127</span> </span><span class="WHIT">        		</span><span class="STRN">"articleId"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="NAME">htLoc.articleId</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>128</span> </span><span class="WHIT">        		</span><span class="STRN">"side"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"left"</span><span class="WHIT">
<span class='line'>129</span> </span><span class="WHIT">        	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>130</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>131</span> </span><span class="WHIT">        </span><span class="WHIT">
<span class='line'>132</span> </span><span class="WHIT">        </span><span class="NAME">bRightPage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT">        </span><span class="NAME">htLoc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.searchCurrentPath</span><span class="PUNC">(</span><span class="NAME">this._htPathList</span><span class="PUNC">[</span><span class="STRN">"right"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="NAME">htPoint</span><span class="PUNC">,</span><span class="NAME">nDPI</span><span class="PUNC">,</span><span class="NAME">bRightPage</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>134</span> </span><span class="WHIT">        </span><span class="WHIT">
<span class='line'>135</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>136</span> </span><span class="WHIT">    		</span><span class="STRN">"IDX"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">htLoc.IDX</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>137</span> </span><span class="WHIT">    		</span><span class="STRN">"articleId"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="NAME">htLoc.articleId</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT">    		</span><span class="STRN">"side"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"right"</span><span class="WHIT">
<span class='line'>139</span> </span><span class="WHIT">    	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>141</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>142</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>143</span>  	 * 좌표 값으로 Path데이터를 찾는다.
<span class='line'>144</span>  	 * @param {Array} aPathList path 데이터
<span class='line'>145</span>  	 * @param {Hashtable} htPoint 찾을 좌표 값
<span class='line'>146</span> 	 * @param {Number} nDPI  배율
<span class='line'>147</span> 	 * @param {Boolean} bRightPage  우측 페이지 여부
<span class='line'>148</span>  	 * @return {Hashtable} 기사 ID값과 index값
<span class='line'>149</span>  	 */</span><span class="WHIT">
<span class='line'>150</span> </span><span class="WHIT">	 </span><span class="NAME">searchCurrentPath</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aPathList</span><span class="PUNC">,</span><span class="NAME">htPoint</span><span class="PUNC">,</span><span class="NAME">nDPI</span><span class="PUNC">,</span><span class="NAME">bRightPage</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>151</span> </span><span class="WHIT">		 </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aPoint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>152</span> </span><span class="WHIT">		 </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>153</span> </span><span class="WHIT">		 </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sArticleId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>154</span> </span><span class="WHIT">		 </span><span class="NAME">$A</span><span class="PUNC">(</span><span class="NAME">aPathList</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">forEach</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">v</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">o</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>155</span> </span><span class="WHIT">	       	 </span><span class="NAME">aPoint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">o</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">outlines.outline</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>156</span> </span><span class="WHIT">	            </span><span class="WHIT">
<span class='line'>157</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.isContainPoint</span><span class="PUNC">(</span><span class="NAME">this.multiplicate</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aPoint</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bRightPage</span><span class="PUNC">,</span><span class="NAME">nDPI</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htPoint</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>158</span> </span><span class="WHIT">                </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>159</span> </span><span class="WHIT">            	</span><span class="NAME">sArticleId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPathList</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">articleId</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>160</span> </span><span class="COMM">//                $A.Break();</span><span class="WHIT">
<span class='line'>161</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>162</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>163</span> </span><span class="WHIT">		 </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>164</span> </span><span class="WHIT">			</span><span class="STRN">'IDX'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>165</span> </span><span class="WHIT">			</span><span class="STRN">'articleId'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">sArticleId</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>166</span> </span><span class="WHIT">		 </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>167</span> </span><span class="WHIT">     </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>168</span> </span><span class="WHIT">     </span><span class="WHIT">
<span class='line'>169</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>170</span>   	 * 파라미터로 넘어온 면/index정보를 바탕으로 path 좌표를 반환한다.
<span class='line'>171</span>   	 * @param {String} sSide 좌/우측 페이지 
<span class='line'>172</span>  	 * @param {Number} nDPI  배율
<span class='line'>173</span>   	 */</span><span class="WHIT">
<span class='line'>174</span> </span><span class="WHIT">     </span><span class="NAME">getPointList</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sSide</span><span class="PUNC">,</span><span class="NAME">nIdx</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>175</span> </span><span class="WHIT">         </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this._htPathList</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">nIdx</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">outlines.outline</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>176</span> </span><span class="WHIT">     </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>177</span> </span><span class="WHIT">     </span><span class="WHIT">
<span class='line'>178</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>179</span>    	 * path좌표가 사용자의 마우스 좌표를 포함하는지 체크한다.
<span class='line'>180</span>    	 * @param {Hashtable} aPolygonPoint path좌표
<span class='line'>181</span>   	 * @param {Hashtable} htPoint 사용자의 마우스 좌표
<span class='line'>182</span>    	 */</span><span class="WHIT">
<span class='line'>183</span> </span><span class="WHIT">     </span><span class="NAME">isContainPoint</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aPolygonPoint</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htPoint</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>184</span> </span><span class="WHIT">         </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nHitCount</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>185</span> </span><span class="WHIT">         </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nMaxX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nMaxY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>186</span> </span><span class="WHIT">         </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nMinX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Number.MAX_VALUE</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nMinY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Number.MAX_VALUE</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>187</span> 
<span class='line'>188</span> </span><span class="WHIT">         </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">fnSignedArea</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">htP1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htP2</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htP3</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>189</span> </span><span class="WHIT">             </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nArea</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">htP1.x</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">htP2.y</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">htP1.y</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">htP2.x</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>190</span> </span><span class="WHIT">                     </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">htP2.x</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">htP3.y</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">htP2.y</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">htP3.x</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'>191</span> </span><span class="WHIT">                     </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">htP3.x</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">htP1.y</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">htP3.y</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">htP1.x</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>192</span> </span><span class="WHIT">             </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nArea</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>193</span> </span><span class="WHIT">                 </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>194</span> </span><span class="WHIT">             </span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>195</span> </span><span class="WHIT">                 </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>196</span> </span><span class="WHIT">         </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>197</span> </span><span class="WHIT">         </span><span class="WHIT">
<span class='line'>198</span> </span><span class="WHIT">         </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">fnIsIntersection</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">htP1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htP2</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htP3</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htP4</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>199</span> </span><span class="WHIT">             </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">fnSignedArea</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">htP1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htP2</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htP3</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">fnSignedArea</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">htP1</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htP2</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htP4</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&lt;=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
<span class='line'>200</span> </span><span class="WHIT">                     </span><span class="PUNC">(</span><span class="NAME">fnSignedArea</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">htP3</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htP4</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htP1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">fnSignedArea</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">htP3</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htP4</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htP2</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&lt;=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>201</span> </span><span class="WHIT">                 </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>202</span> </span><span class="WHIT">             </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>203</span> </span><span class="WHIT">                 </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>204</span> </span><span class="WHIT">             </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>205</span> </span><span class="WHIT">         </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>206</span> 
<span class='line'>207</span> </span><span class="WHIT">         </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aPolygonPoint.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>208</span> </span><span class="WHIT">             </span><span class="NAME">nMaxX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">nMaxX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aPolygonPoint</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>209</span> </span><span class="WHIT">             </span><span class="NAME">nMaxY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">nMaxY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aPolygonPoint</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>210</span> </span><span class="WHIT">             </span><span class="NAME">nMinX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">nMinX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aPolygonPoint</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>211</span> </span><span class="WHIT">             </span><span class="NAME">nMinY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">nMinY</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aPolygonPoint</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>212</span> </span><span class="WHIT">         </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>213</span> </span><span class="WHIT">         </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nMaxX</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">htPoint.x</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">htPoint.x</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">nMinX</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>214</span> </span><span class="WHIT">         </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nMaxY</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">htPoint.y</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">htPoint.y</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">nMinY</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>215</span> 
<span class='line'>216</span> </span><span class="WHIT">         </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aTempPoint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPolygonPoint.slice</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>217</span> </span><span class="WHIT">         </span><span class="NAME">aTempPoint.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aPolygonPoint</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>218</span> 
<span class='line'>219</span> </span><span class="WHIT">         </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aPolygonPoint.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>220</span> </span><span class="WHIT">             </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">Math.min</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aPolygonPoint</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aTempPoint</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">htPoint.y</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>221</span> </span><span class="WHIT">             </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aPolygonPoint</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aTempPoint</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">htPoint.y</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>222</span> 
<span class='line'>223</span> </span><span class="WHIT">             </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">fnIsIntersection</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aPolygonPoint</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aPolygonPoint</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aTempPoint</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">aTempPoint</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">htPoint</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">htPoint.x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">nMaxX</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">y</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">htPoint.y</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>224</span> </span><span class="WHIT">                 </span><span class="NAME">nHitCount</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>225</span> </span><span class="WHIT">         </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>226</span> </span><span class="WHIT">         </span><span class="WHIT">
<span class='line'>227</span> </span><span class="WHIT">         </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nHitCount</span><span class="WHIT"> </span><span class="PUNC">%</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>228</span> </span><span class="WHIT">             </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>229</span> </span><span class="WHIT">         </span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>230</span> </span><span class="WHIT">             </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>231</span> </span><span class="WHIT">     </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>232</span> </span><span class="WHIT">     </span><span class="WHIT">
<span class='line'>233</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>234</span>  	 * 특정 path 보여주는 함수
<span class='line'>235</span>  	 * @param {String} sArticleId 기사 id
<span class='line'>236</span>  	 */</span><span class="WHIT">
<span class='line'>237</span> </span><span class="WHIT"> 	</span><span class="NAME">showPathBtArtileId</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sArticleId</span><span class="PUNC">,</span><span class="NAME">nDPI</span><span class="PUNC">,</span><span class="NAME">sType</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>238</span> </span><span class="WHIT"> 		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">htLoc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._getArticleLoc</span><span class="PUNC">(</span><span class="NAME">sArticleId</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>239</span> </span><span class="WHIT"> 		</span><span class="NAME">this._drawPath</span><span class="PUNC">(</span><span class="NAME">htLoc</span><span class="PUNC">,</span><span class="NAME">nDPI</span><span class="PUNC">,</span><span class="NAME">sType</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>240</span> </span><span class="WHIT"> 	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>241</span> </span><span class="WHIT"> 	</span><span class="WHIT">
<span class='line'>242</span> </span><span class="WHIT"> 	</span><span class="COMM">/**
<span class='line'>243</span>  	 * 특정 path의 좌표 정보를 반환 하는 함수
<span class='line'>244</span>  	 * @param {String} sArticleId 기사 id
<span class='line'>245</span>  	 * @return {Hashtable} 기사 좌표 정보
<span class='line'>246</span>  	 */</span><span class="WHIT">
<span class='line'>247</span> </span><span class="WHIT"> 	</span><span class="NAME">_getArticleLoc</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sArticleId</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>248</span> </span><span class="WHIT"> 		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nTargetIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>249</span> </span><span class="WHIT"> 		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aData</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._htPathList</span><span class="PUNC">[</span><span class="STRN">"left"</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>250</span> </span><span class="WHIT"> 		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">len</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aData.length</span><span class="PUNC">;</span><span class="NAME">nIdx</span><span class="PUNC">&lt;</span><span class="NAME">len</span><span class="PUNC">;</span><span class="NAME">nidx</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>251</span> </span><span class="WHIT"> 			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">sArticleId</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">aData</span><span class="PUNC">[</span><span class="NAME">nIdx</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">articleId</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>252</span> </span><span class="WHIT"> 				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>253</span> </span><span class="WHIT"> 					</span><span class="STRN">'IDX'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>254</span> </span><span class="WHIT"> 					</span><span class="STRN">'side'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"left"</span><span class="WHIT">
<span class='line'>255</span> </span><span class="WHIT"> 				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>256</span> </span><span class="WHIT"> 			</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>257</span> </span><span class="WHIT"> 		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>258</span> </span><span class="WHIT"> 		</span><span class="WHIT">
<span class='line'>259</span> </span><span class="WHIT"> 		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aData</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._htPathList</span><span class="PUNC">[</span><span class="STRN">"right"</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>260</span> </span><span class="WHIT"> 		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">len</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aData.length</span><span class="PUNC">;</span><span class="NAME">nIdx</span><span class="PUNC">&lt;</span><span class="NAME">len</span><span class="PUNC">;</span><span class="NAME">nidx</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>261</span> </span><span class="WHIT"> 			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">sArticleId</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">aData</span><span class="PUNC">[</span><span class="NAME">nIdx</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">articleId</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>262</span> </span><span class="WHIT"> 				</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>263</span> </span><span class="WHIT"> 					</span><span class="STRN">'IDX'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>264</span> </span><span class="WHIT"> 					</span><span class="STRN">'side'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"right"</span><span class="WHIT">
<span class='line'>265</span> </span><span class="WHIT"> 				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>266</span> </span><span class="WHIT"> 			</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>267</span> </span><span class="WHIT"> 		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>268</span> </span><span class="WHIT"> 	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>269</span> </span><span class="WHIT"> 	</span><span class="WHIT">
<span class='line'>270</span> </span><span class="WHIT"> 	</span><span class="COMM">/**
<span class='line'>271</span>  	 * 특정 path 숨기는 함수
<span class='line'>272</span>  	 * @param {String} sArticleId 기사 id
<span class='line'>273</span>  	 */</span><span class="WHIT">
<span class='line'>274</span> </span><span class="WHIT"> 	</span><span class="NAME">hidePath</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sArticleId</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>275</span> </span><span class="WHIT"> 		</span><span class="NAME">this._ctx.clearRect</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">this.nWidth</span><span class="PUNC">,</span><span class="NAME">this.nHeight</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>276</span> </span><span class="WHIT"> 	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>277</span> </span><span class="WHIT"> 	</span><span class="WHIT">
<span class='line'>278</span> </span><span class="WHIT"> 	</span><span class="COMM">/**
<span class='line'>279</span>  	 * 사용하지 않으나 pathManager와의 인터페이스를 맞추기 위해 dummy함수로 만들어두었음
<span class='line'>280</span>  	 */</span><span class="WHIT">
<span class='line'>281</span> </span><span class="WHIT"> 	</span><span class="NAME">changePathWidth</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nWidth</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>282</span> </span><span class="WHIT"> 	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>283</span> </span><span class="WHIT"> 	</span><span class="WHIT">
<span class='line'>284</span> </span><span class="WHIT"> 	</span><span class="COMM">/**
<span class='line'>285</span>  	 * 사용하지 않으나 pathManager와의 인터페이스를 맞추기 위해 dummy함수로 만들어두었음
<span class='line'>286</span>  	 */</span><span class="WHIT">
<span class='line'>287</span> </span><span class="WHIT"> 	</span><span class="NAME">changePathColor</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sColor</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>288</span> </span><span class="WHIT"> 	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>289</span> </span><span class="WHIT"> 	</span><span class="WHIT">
<span class='line'>290</span> </span><span class="WHIT"> 	</span><span class="COMM">/**
<span class='line'>291</span>  	 * 사용하지 않으나 pathManager와의 인터페이스를 맞추기 위해 dummy함수로 만들어두었음
<span class='line'>292</span>  	 */</span><span class="WHIT">
<span class='line'>293</span> </span><span class="WHIT"> 	</span><span class="NAME">createPathes</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nDPI</span><span class="PUNC">,</span><span class="NAME">nExtraLeft</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>294</span> </span><span class="WHIT"> 	</span><span class="WHIT">
<span class='line'>295</span> </span><span class="WHIT"> 	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>296</span> </span><span class="WHIT"> 	</span><span class="WHIT">
<span class='line'>297</span> </span><span class="WHIT"> 	</span><span class="COMM">/**
<span class='line'>298</span>  	 * 사용하지 않으나 pathManager와의 인터페이스를 맞추기 위해 dummy함수로 만들어두었음
<span class='line'>299</span>  	 */</span><span class="WHIT">
<span class='line'>300</span> </span><span class="WHIT"> 	</span><span class="NAME">removePath</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>301</span> </span><span class="WHIT"> 	</span><span class="WHIT">
<span class='line'>302</span> </span><span class="WHIT"> 	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>303</span> </span><span class="WHIT"> 	</span><span class="WHIT">
<span class='line'>304</span> </span><span class="WHIT"> 	</span><span class="COMM">/**
<span class='line'>305</span>  	 * 사용하지 않으나 pathManager와의 인터페이스를 맞추기 위해 dummy함수로 만들어두었음
<span class='line'>306</span>  	 */</span><span class="WHIT">
<span class='line'>307</span> </span><span class="WHIT"> 	</span><span class="NAME">changePathStyle</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sStyle</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>308</span> </span><span class="WHIT"> 	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>309</span> </span><span class="WHIT"> 	</span><span class="WHIT">
<span class='line'>310</span> </span><span class="WHIT"> 	</span><span class="COMM">/**
<span class='line'>311</span>  	 * SVG영역을 노출한다.
<span class='line'>312</span>  	 */</span><span class="WHIT">
<span class='line'>313</span> </span><span class="WHIT"> 	</span><span class="NAME">showArticleContainer</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>314</span> </span><span class="WHIT">		</span><span class="NAME">this._elMarker.style.display</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"block"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>315</span> </span><span class="WHIT">		</span><span class="NAME">this._elPath.style.display</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"block"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>316</span> </span><span class="WHIT"> 	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>317</span> </span><span class="WHIT"> 	</span><span class="WHIT">
<span class='line'>318</span> </span><span class="WHIT"> 	</span><span class="COMM">/**
<span class='line'>319</span>  	 * SVG영역을 숨긴다.
<span class='line'>320</span>  	 */</span><span class="WHIT">
<span class='line'>321</span> </span><span class="WHIT"> 	</span><span class="NAME">hideArticleContainer</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>322</span> </span><span class="WHIT"> 		</span><span class="NAME">this._elMarker.style.display</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"none"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>323</span> </span><span class="WHIT">		</span><span class="NAME">this._elPath.style.display</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"none"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>324</span> </span><span class="WHIT"> 	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>325</span> </span><span class="PUNC">}</span><span class="PUNC">;</span></pre></body></html>